Skip to content

fix: prevent comparison swap refetches - #200

Merged
O2sa merged 1 commit into
O2sa:mainfrom
snowyukitty:fix/compare-swap-without-refetch
Aug 14, 2026
Merged

fix: prevent comparison swap refetches#200
O2sa merged 1 commit into
O2sa:mainfrom
snowyukitty:fix/compare-swap-without-refetch

Conversation

@snowyukitty

Copy link
Copy Markdown
Contributor

Fixes #189

Summary

  • Treat swapped username pairs and reordered language filters as the same comparison fetch.
  • Preserve the latest presentation order in the URL and displayed data without issuing another /api/compare request.
  • Reconcile in-flight completions with the latest presentation and ignore stale results or errors for a different comparison.
  • Add focused regression coverage for swap, history, language, duplicate-submit, and stale-response behavior.

Validation

  • 13 Vitest files and 97 tests passed
  • ESLint passed
  • TypeScript --noEmit passed
  • Locale validation passed
  • Next.js production build passed (161 pages generated)
  • The exact change was manually reviewed and its swap/history behavior was personally tested

Additionally, at the time of submission of this PR:

  • The referred issue is not blocked currently
  • All unittests passed after changes were made

@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

@snowyukitty is attempting to deploy a commit to the osama's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

Thank you for the pull request! ✅

A maintainer will review this soon. Please be patient while we take a look. 🙌

@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dev-impact Ready Ready Preview Aug 14, 2026 8:38pm

@O2sa
O2sa merged commit dab4a96 into O2sa:main Aug 14, 2026
3 checks passed
@O2sa

O2sa commented Aug 14, 2026

Copy link
Copy Markdown
Owner

🎊 Welcome, @snowyukitty! Your first contribution has been merged! 🚀

Thank you for helping improve the project! If you find this tool useful, please consider giving us a ⭐ star on GitHub—it helps more developers find our work and motivates us to keep improving!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Prevent compare swap from refetching user data

2 participants